import 'package:storage/generated/json/base/json_field.dart';
import 'package:storage/generated/json/user_name_entity.g.dart';
import 'dart:convert';
export 'package:storage/generated/json/user_name_entity.g.dart';

@JsonSerializable()
class UserNameEntity {
  int? goodsId;
  String? goodsName;
  String? goodsSpecification;
  int? goodsType;
  String? warehouseInTime;
  String? lastWarehouseOutTime;
  int? inventoryQuantity;
  double? goodsPrice;
  double? lastEditPrice;

  /// 这个model的必填项 name inventoryQuantity goodsPrice
  UserNameEntity({
    this.goodsId,
    this.goodsName,
    this.goodsPrice,
    this.goodsType,
    this.inventoryQuantity,
    this.lastWarehouseOutTime,
    this.lastEditPrice,
    this.warehouseInTime,
    this.goodsSpecification,
  });

  factory UserNameEntity.fromJson(Map<String, dynamic> json) =>
      $UserNameEntityFromJson(json);

  Map<String, dynamic> toJson() => $UserNameEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
